package com.example.endusation.controller;

import com.example.endusation.dto.UserInfoDTO;
import com.example.endusation.service.UserFunctionService;
import com.example.endusation.util.WrapperResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RequestBody;
@RestController
@RequestMapping("/core/web/user")
public class UserFunctionController {
    @Autowired
    private UserFunctionService userFunctionService;

    @PostMapping("/queryLearnAddress")
    public WrapperResponse queryLearnAddress( @RequestBody UserInfoDTO userInfoDTO){
        return userFunctionService.queryLearnAddress(userInfoDTO);
    }
    @PostMapping("/queryLearnVideo")
    public WrapperResponse queryLearnVideo( @RequestBody UserInfoDTO userInfoDTO){
        return userFunctionService.queryLearnVideo(userInfoDTO);
    }
    @PostMapping("/queryLearnDocument")
    public WrapperResponse queryLearnDocument( @RequestBody UserInfoDTO userInfoDTO){
        return userFunctionService.queryLearnDocument(userInfoDTO);
    }
    @PostMapping("/queryLearnTest")
    public WrapperResponse queryLearnTest(@RequestBody UserInfoDTO userInfoDTO){
        return userFunctionService.queryLearnTest(userInfoDTO);
    }

    @PostMapping("/queryExerciseDetil")
    public WrapperResponse queryExerciseDetil(@RequestBody String exerciseId){
      return  userFunctionService.queryExerciseDetil(exerciseId);
    }
}
